macos: treat some toplevel NSWindow like document windows
authorChristian Hergert <chergert@redhat.com>
Tue, 24 Nov 2020 20:39:19 +0000 (12:39 -0800)
committerChristian Hergert <chergert@redhat.com>
Wed, 2 Dec 2020 00:19:04 +0000 (16:19 -0800)
This makes the window animate in by the window manager like other
application windows on macOS. Currently ignored for transient windows.

gdk/macos/gdkmacostoplevelsurface.c

index a9a648841958be89cf28506b6db566c9fcfe20ec..05d88ba94ff00df6566b9e4ad91a5bc6b54569e9 100644 (file)
@@ -174,6 +174,8 @@ _gdk_macos_toplevel_surface_present (GdkToplevel       *toplevel,
     }
   else
     {
+      [nswindow setAnimationBehavior:NSWindowAnimationBehaviorDocumentWindow];
+
       if (!self->decorated &&
           !GDK_MACOS_SURFACE (self)->did_initial_present &&
           GDK_SURFACE (self)->x == 0 &&